<?php
echo $this->adminToolBar('user', 'index', '/user/adduser/', '/user/edituser/', '/admin/user/deleteuser/');
?>
<?php
if(count($this->view_users) > 0)
{
?>
<table border="1" width="98%" cellpadding="1" cellspacing="2" class="box-table-a">
    <tr>
    	<th align="center" scope="col" width="3%">#</th>
    	<th align="center" scope="col" width="10%">Nickname</th>
    	<th align="center" scope="col" width="12%">First Name</th>
    	<th align="center" scope="col" width="12%">Last Name</th>
    	<th align="center" scope="col" width="18%">Email</th>
    	<th align="center" scope="col" width="10%">Member Since</th>
    	<th align="center" scope="col" width="5%">Is Login</th>
    	<th align="center" scope="col" width="5%">Status</th>
    	<th align="center" scope="col" width="3%">&nbsp;</th>
    	<th align="center" scope="col" width="3%">&nbsp;</th>
    </tr>

<?php
foreach($this->view_users as $users_entry) :?>
	<tr>
	    <td align="center"><?php echo $users_entry['userid'];?></td>
	    <td><?php echo $users_entry['username'];?></td>
	    <td><?php echo $users_entry['first_name'];?></td>
	    <td><?php echo $users_entry['last_name'];?></td>
	    <td><?php echo $users_entry['email_address'];?></td>
	    <td align="center"><?php echo $users_entry['created_date'];?></td>
	    <td align="center"><?php echo $users_entry['is_online'];?></td>
	    <td align="center"><?php echo $users_entry['status'];?></td>
	    <td align="center"><a href="javascript: void(0);" onclick="loadPage('/user/edit/userid/<?php echo $users_entry['userid']; ?>');" title="Edit"><img src="/images/icons/edit.gif" alt=""/></a></td>
	    <td align="center"><a href="javascript: void(0);" onclick="deleteUser('<?php echo $users_entry['userid']; ?>');" title="Delete"><img src="/images/icons/disable.gif" alt=""/></a></td> 
	</tr>
<?php endforeach; ?>
</table>
<?php
} else {
?>
	<table border="0" width="98%" cellpadding="1" cellspacing="2">
		<tr>
			<td align="center" class="no_data">No records to show</td>
		</tr>
	</table>
<?php
}
?>
<div id="show_adduser_form" style="display: none;" title="Add User">
	<div id="table_content"></div>
</div>